The present invention relates to an image processing apparatus and method for receiving image data having a plurality of drawing objects, and processing the image data.
The arrangement of an information processing apparatus with a conventional printer driver will be explained below with reference to FIG. 10.
FIG. 10 is a block diagram showing the functional arrangement of an information processing apparatus with a conventional printer driver.
Referring to FIG. 10, reference numeral 101 denotes a host (PC) as the information processing apparatus; and 102, a printer connected to the host 101. An image based on print job data generated on the host 101 is output by the printer 102.
Especially, FIG. 10 shows the processing flow of printing executed on the information processing apparatus.
An application program 103 sequentially passes print job data generated on the host 101 to a drawing control system 104. The drawing control system 104 converts the print job data into data in the format that a printer driver 109 can draw, and passes the converted data to a spooler 105. This data contains logical drawing objects, and drawing control information for the printer 102. Note that the drawing control system 104 is normally a program on the system level, and corresponds to the GDI in, e.g., Windows as the OS available from the Microsoft Corp.
The spooler 105 sets the output from the drawing control system 104 in a spool file 107, and informs a queue controller 106 of completion of spooling to make it place the print job in a queue. The queue controller 106 manages the execution order of printing in units of print jobs. That is, the queue controller 106 receives a message indicating that the print job has been set in the spool file 107 from the spooler 105, and places that print job in a print queue. Also, the queue controller 106 starts a despooler 108 to execute the output processing of the print job, normally from the first print job (oldest print job) in the queue.
The despooler 108 picks up the spool file of the print job designated by the queue controller 106, and passes it to the printer driver 109. The printer driver 109 converts the logical drawing objects and drawing control information for the printer 102, which are generated by the drawing control system 104, into physical drawing objects and drawing control information that the printer 102 can recognize. The printer driver 109 then transmits the converted drawing objects and drawing control information to the printer 102 via an I/O controller 111. The I/O controller 111 performs data buffering and I/O control to transmit a datastream generated by the printer driver 109 to the printer 102.
A user interface 1001 is used by the user to direct the operation mode of the printer driver 109. Normally, an application opens a dialog box displayed on the user interface 1001 at the beginning of printing, and the user instructs the operation mode and other parameters associated with driver processing on the dialog box.
It is a common practice to implement the driver processing that controls the processing resolution of the printer driver 109 on the basis of the output resolution of the printer 102. However, since recent printer engines have higher resolutions, if the driver processing is done based on the output resolution of the printer engine, it requires much processing time. Also, high-quality printing expression is hard to attain by simple high-resolution processing for data such as image data that requires gradation characteristics.
For this reason, the printer driver performs low-resolution rasterization for image data, and the printer engine performs high-resolution processing such as a density pattern method effective for gradation expression.
For example, when the printer engine has an output resolution of 600 dpi and prints text and graphics that require high edge quality, the printer driver performs rasterization at 600 dpi. When the printer engine prints image data that requires gradation expression, the printer driver performs rasterization at 300 dpi, so that the printer engine can attain gradation expression in units of 2.times.2 dot blocks. Furthermore, when the printer engine has an output resolution of 1,200 dpi, the printer engine is capable of gradation expression in units of 4.times.4 dot blocks, thus realizing finer halftone expression.
In the information processing apparatus with the conventional printer driver described above, data generated by each of various application programs running on that information processing apparatus is made up of a plurality of drawing objects in a single print job. Each of these objects has one of the following attributes:
i) Image PA1 ii) Graphics PA1 iii) Text PA1 (1) When the whole print job is rasterized at high resolution to maintain the quality of text, rasterization itself and post-processing such as color conversion and the like to be executed after the rasterization require much time, and the required memory capacity increases. PA1 (2) When rasterization is done at low resolution while placing an importance on the processing speed and gradation characteristics, the edge quality of an image such as text is impaired and becomes jaggy, resulting in poor image quality. PA1 (3) The drawing objects include two types of images, i.e., images (text, graphics) that place an importance on resolution and those (halftone images) that place an importance on gradation (color expression). In a print job including both types of images, it is difficult to obtain both high expression quality and high processing speed at the same time. PA1 first rasterization means for rasterizing a drawing object at a first resolution; PA1 second rasterization means for rasterizing a drawing object at a second resolution lower than the first resolution; and PA1 selection means for, when the input image data includes drawing objects which overlap each other, selecting the rasterization means for the overlapping drawing objects on the basis of attributes of the overlapping objects. PA1 the selection means comprises determination means for determining a drawing object having an image attribute to be an image drawing object, and determining a drawing object having an attribute other than the image to be a non-image drawing object, and PA1 the selection means selects the rasterization means for the overlapping drawing objects on the basis of a determination result of the determination means. PA1 first clip means for clipping a processing result of the first rasterization means on the basis of a selection result of the selection means; and PA1 second clip means for clipping a processing result of the second rasterization means on the basis of a selection result of the selection means, and PA1 when the first and second rasterization means are selected as the selection result of the selection means, the first clip means clips a portion which does not overlap the image drawing object, and the second clip means clips a portion which overlaps the image drawing object. PA1 low-resolution conversion means for converting a processing result of the first clip means into low-resolution data, and PA1 when the first and second rasterization means are selected as the selection result of the selection means, the first clip means clips a portion which overlaps the image drawing object, and PA1 the low-resolution conversion means converts the clipped portion which overlaps the image drawing object portion into low-resolution data. PA1 first holding means for holding a processing result of the first rasterization means; PA1 second holding means for holding a processing result of the second rasterization means; and PA1 synthesis means for synthesizing the two processing results by overwriting the processing result held on the second holding means on the processing result held on the first holding means. PA1 the first rasterization step of rasterizing a drawing object at a first resolution; PA1 the second rasterization step of rasterizing a drawing object at a second resolution lower than the first resolution; and PA1 the selection step of selecting, when the input image data includes drawing objects which overlap each other, the rasterization step for each of the overlapping drawing objects on the basis of attributes of the overlapping objects. PA1 a program code of the first rasterization step of rasterizing a drawing object at a first resolution; PA1 a program code of the second rasterization step of rasterizing a drawing object at a second resolution lower than the first resolution; and PA1 a program code of the selection step of selecting, when the input image data includes drawing objects which overlap each other, the rasterization step for each of the overlapping drawing objects on the basis of attributes of the overlapping objects.
In one print job, the drawing objects are rendered at an identical resolution, and their expression means (color conversion, rendering resolution, dot pattern formation) are designed to keep balance in every object attributes.
However, the information processing apparatus with the conventional printer driver suffers the following problems.
In order to solve these problems (1) to (3), a drawing object that places an importance on resolution may be rasterized at high resolution, and a drawing object that places an importance on gradation may be rasterized at low resolution while increasing the number of bits to be assigned in units of pixels. However, upon executing such rasterization, the following problem is posed.
That is, the drawing control system such as GDI forms the drawing contents by mapping drawing objects in turn, and performing raster operations. In the raster operations, arithmetic operations between pixels of a newly mapped drawing object, and corresponding ones (having the same spatial positions as those of the former pixels) of already processed pixels which are held on a buffer are made, and image formation indicated by that drawing object is done on the buffer on the basis of the arithmetic operation results. For this reason, when a single drawing object includes data having different resolutions and data formats, it is practically impossible to perform the raster operations, and the drawing contents indicated by the drawing object cannot be formed on the buffer.